package com.firmboy.threadPool;

import org.springframework.scheduling.concurrent.DefaultManagedAwareThreadFactory;

import java.util.concurrent.ArrayBlockingQueue;
import java.util.concurrent.ThreadPoolExecutor;
import java.util.concurrent.TimeUnit;

/**
 * 线程池工厂类
 *
 * @author firmboy
 * @create 2018-04-14 下午12:52
 **/
public class PoolFactory {


    private static ThreadPoolExecutor pool = new ThreadPoolExecutor(30, 100, 6L, TimeUnit.SECONDS, new ArrayBlockingQueue(10), new DefaultManagedAwareThreadFactory());


    public static ThreadPoolExecutor getPool(){

        return pool;
    }

}
